/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.jiadakeji.ppm.modules.invoice.service;


import com.jiadakeji.ppm.common.persistence.Page;
import com.jiadakeji.ppm.common.service.CrudService;
import com.jiadakeji.ppm.modules.invoice.dao.CounterDao;
import com.jiadakeji.ppm.modules.invoice.entity.Counter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 发票柜台Service
 * @author 李远忠
 * @version 2018-12-03
 */
@Service
@Transactional(readOnly = true)
public class CounterService extends CrudService<CounterDao, Counter> {
	@Autowired
	private CounterDao counterDao;

	public Counter get(String id) {
		return super.get(id);
	}
	
	public List<Counter> findList(Counter counter) {
		return super.findList(counter);
	}
	
	public Page<Counter> findPage(Page<Counter> page, Counter counter) {
		return super.findPage(page, counter);
	}
	
	@Transactional(readOnly = false)
	public void save(Counter counter) {
		super.save(counter);
	}
	
	@Transactional(readOnly = false)
	public void delete(Counter counter) {
		//TODO 删除其它关联表
		
		super.delete(counter);
	}

	public Counter getByAccount(Counter counter) {
		return counterDao.getByAccount(counter);
	}
}